<!DOCTYPE html>
<html>
<head>
<title>预约借款信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<#include "../../../include/resources.html">
<script type="text/javascript">
    var dataGrid;
    var winWidth =  800;
    var winHeight = 500;
    var verifyTitle = "预约借款";
    var verifyUrl =  "/modules/loan/borrowBespeak/borrowBespeakEditPage.html";
    var verifyWinParmeters = "'{0}','"+verifyTitle+"',550,500,'"+verifyUrl+"'";
    //查看
    var viewTitle = "查看预约借款";
    var viewUrl =  "/modules/loan/borrowBespeak/borrowBespeakViewPage.html";

    
    $(function() {
        dataGrid = $('#dataGrid').datagrid({
            url : 'borrowBespeakList.html',
            fit : true,
            fitColumns : true,
            border : false,
            pagination : true,
            idField : 'id',
            pageSize : pageSize,
            pageNums :1,
            pageList : pageList,
            sortName : 'id',
            sortOrder : 'asc',
            checkOnSelect : false,
            selectOnCheck : false,
            nowrap : false,
			singleSelect:true,
            columns : [ [
			  { field: 'id', title: '编号', width: 50,fixed:true, sortable:false },
			  { field: 'status', title: '状态', width: 60,fixed:true, sortable:false,formatter: function(value,row,index){
				  if(value == 0){
             		 return "未处理"; 
             	  }else if(value == 1){
             	 	 return "已回访";
             	  }else if(value == 2){
             		 return "不回访";
             	  }
              }},
              { field: 'companyName', title: '公司名称', width: 100,fixed:true, sortable:false },
              { field: 'name', title: '联系人姓名', width: 80, fixed:true,sortable:false },   
              { field: 'telephone', title: '联系电话', width: 100, sortable:false },
              { field: 'money', title: '借款金额(元)', width: 120, sortable:false },
              { field: 'limitTime', title: '借款期限(天)', width: 100, sortable:false },
              { field: 'addTime', title: '添加时间', width: 150,fixed:true, sortable:false, 
            	  formatter: function(value,row,index){
					return getLocalTime(value,4);
  				  }  
              }, 
              { field: 'addIp', title: '添加IP', width: 150,fixed:true,fixed:true, sortable:false },
              { field: 'doTime', title: '处理时间', width: 150,sortable:false,
            	  formatter: function(value,row,index){
            	  	return getLocalTime(value,4);
				  }  
              },
              { field : 'action',
                title : '操作',
                width :50,
                fixed:true,
                formatter : function(value, row, index) {
                  var str ='';
                	if(row.status == 0)
                  {
                        str += '<a href="javascript:void(0);" onclick="$.fn.dataGridOptions.editFun('+row.id+',verifyTitle,winWidth,winHeight,verifyUrl);" title="'+verifyTitle+'">编辑</a>';
                	}
                  else
                  {
                        str += '<a href="javascript:void(0);" onclick="$.fn.dataGridOptions.closeFun('+row.id+',viewTitle,winWidth,winHeight,viewUrl);" title="'+viewTitle+'">查看</a>';
                	}
                  return str;
                }
              } 
             ] ]
        });
    });
</script>
</head>
<body style="padding:0 20px;" >
    <div class="easyui-layout" data-options="fit : true,border : false">
        <div data-options="region:'north',border:false,collapsible:false" id="searchBox">
        	<div class="sLeft">
	            <form id="searchForm">
	            	<input type="text"  name="searchName" class="sInput" placeholder="输入公司名称/联系人姓名进行搜索" autocomplete="off" onkeydown="if(event.keyCode == 13){ $.fn.dataGridOptions.searchFun('#searchForm');return false;}"/><a href="javascript:;" title="查询" class="sBtn" onclick="$.fn.dataGridOptions.searchFun('#searchForm');">查询</a><a href="javascript:;" class="advBtn" title="条件查询">条件查询 <i class="iconfont">&#xe638;</i></a>
                        <a href="javascript:void(0);" class="reloadIcon" onclick="dataGrid.datagrid('reload');" title="刷新" ><i class="iconfont">&#xe603;</i></a>
	            </form>
            </div>
            <form id="showAdw">
		        <ul class="showAdw" style="display:none;">
		        	<a href="javascript:void(0);"><i class="iconfont closeWin">&#xe63a;</i></a>
		        	<li><span>公司名称</span><input type="text" name="companyName" autocomplete="off"/></li>
		        	<li><span>联系人姓名</span><input type="text" name="name" autocomplete="off"/></li>
		       		<li><span>联系电话</span><input type="text" name="telephone" autocomplete="off"/></li>
		       		<li><span>状态</span><select name="status" class="type">
		                  <option value="0" selected="selected">未处理</option>
		                  <option value="1">已回访</option>
		                  <option value="2">不回访</option>
		                </select></li>
		       		<li><span>&nbsp;</span><a href="javascript:void(0);" class="searchBtn sureBtn" onclick="$.fn.dataGridOptions.searchFun('#showAdw');">确定</a><a href="javascript:void(0);" class="searchBtn" onclick="$.fn.dataGridOptions.cleanFun('#searchForm');">重置</a></li>
		        </ul>
	        </form>
        </div>
        <div data-options="region:'center'" style="margin-top:30px;padding-bottom:30px;">
            <table id="dataGrid"></table>
        </div>
    </div>
</body>
</html>
<script src="${theme_dir}/js/search.js"></script>